<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>用户管理</title>
    <script type="text/javascript" src="static/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="static/jquery-easyui/jquery.easyui.min.js"></script>
    <link type="text/css" rel="stylesheet" href="static/css/comm.css"/>
    <link type="text/css" rel="stylesheet" href="static/jquery-easyui/themes/default/easyui.css">
    <link type="text/css" rel="stylesheet" href="static/jquery-easyui/themes/icon.css">
    <script type="text/javascript" src="static/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">

    <div id="mm" class="easyui-menu" style="width:160px;">
        <div icon="icon-add" data-options="iconCls:'icon-add'" onclick="addUserLevel()">添加会员</div>
        <div icon="icon-remove" data-options="iconCls:'icon-remove'" onclick="deleteUserLevel()">删除会员</div>
        <div icon="icon-edit" data-options="iconCls:'icon-edit'" onclick="updateUserLevel()">修改会员</div>
        <div class="menu-sep"></div>
        <div>Exit</div>
    </div>

   <!-- <div class="inner-header" data-options="region:'north'">
        <a href="#" class="easyui-linkbutton" iconCls="icon-add" id="addUserLevel">新增</a>&nbsp;
        <a href="#" class="easyui-linkbutton" iconCls="icon-edit" id="updateUserLevel">编辑</a>&nbsp;
        <a href="#" class="easyui-linkbutton" iconCls="icon-remove" id="deleteUserLevel">删除</a>
    </div>-->
    <div class="tree-div" data-options="region:'west'">
        <div class="easyui-panel" title="用户等级列表" data-options="fit:true">
            <ul  id="user_url">

            </ul>
        </div>
    </div>

    <div class="inner-content" data-options="region:'center'">
        <!-- 数据表 -->
        <table class="easyui-datagrid" title="用户信息列表" fit="true" fitColumns="true"
               toolbar="#userLevelTool"
               striped="true" rownumbers="true"  remoteSort="false" id="userLevelTg">

        </table>
        <!-- /数据表 -->

        <!-- 数据表工具栏 -->
        <div class="toolbar" id="userLevelTool">
            <div class="search-div">
                <label>用户编号：</label>
                <input type="text" class="easyui-textbox" id="userInfoId"/>
                <label>用户名称：</label>
                <input type="text" class="easyui-textbox" id="userInfoName"/>
                <a href="#" class="easyui-linkbutton" iconCls="icon-search" id="searchUserInfo">搜索</a>
            </div>
            <div class="ctrl-div">
                <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" id="userInfoAdd">新增</a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" id="userInfoUpate">编辑</a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" id="multUserInfoDelete">批量删除</a>
            </div>
        </div>
        <!-- /数据表工具栏 -->
    </div>
</div>

<!--用户等级添加-->
<div id="userLevel" class="easyui-dialog" title="用户等级添加"  style="width: 400px; padding: 10px 20px; height: 410px;"
     closed="true" buttons="#userLevel-buttons">
    <form id="userLevelForm" method="post">
        <table cellpadding="5">
            <tr>
                <td>ID:</td>
                <td><input id="lId" class="easyui-textbox" type="text" name="lId" data-options="required:true" validType='length[8,12]'></input></td>
            </tr>
            <tr>
                <td>Name:</td>
                <td><input class="easyui-textbox" type="text" name="lName" data-options="required:true" validType='length[3,10]'></input></td>
            </tr>
            <tr>
                <td>Integral:</td>
                <td>
                    <input class="easyui-textbox" type="text" name="lCzzhi" data-options="required:true" validType='number'></input>
                </td>
            </tr>
            <tr>
                <td>Discount:</td>
                <td><input class="easyui-textbox" type="text" name="lDiscount" data-options="required:true" validType='mone'></input></td>
            </tr>
            <tr>
                <td>Message:</td>
                <td><input class="easyui-textbox" name="lMeber" data-options="multiline:true" style="height:60px"></input></td>
            </tr>
            </tr>
        </table>
        <div id="userLevel-buttons" style="display: block">
            <a id="confirm" href="javascript:void(0)" class="easyui-linkbutton c6" iconcls="icon-ok" onclick="submitUserLevelForm()" style="width: 90px">提交</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#userLevel').dialog('close')" style="width: 90px">取消</a>
        </div>
    </form>
</div>

<!--用户添加-->
<div id="userInfo" class="easyui-dialog" title="用户添加"  style="width: 400px; padding: 10px 20px; height: 650px;"
     closed="true" buttons="#userInfo-buttons">
    <form id="userInfo_form" method="post" enctype="multipart/form-data">
        <table cellpadding="5">
            <tr>
                <td>ID:</td>
                <td><input id="uId" class="easyui-textbox" type="text" name="uId" data-options="required:true" validType='length[8,12]'></input></td>
            </tr>
            <tr>
                <td>UserLevel:</td>
                <td>
                    <select id="userLevel_id" name="lId" class="easyui-combobox" data-options="valueField:'lId', textField:'lName', panelHeight:'auto'" style="width: 140px; height: 40px;"></select>
                </td>
            </tr>
            <tr>
                <td>Name:</td>
                <td><input class="easyui-textbox" id="uName" type="text" name="uName" data-options="required:true" validType='length[2,10]'></input></td>
            </tr>
            <tr>
                <td>Password:</td>
                <td><input class="easyui-textbox" id="uPassword" type="text" name="uPassword" data-options="required:true" validType='length[8,10]'></input></td>
            </tr>
            <tr>
                <td>Nice:</td>
                <td><input class="easyui-textbox" id="uNice" type="text" name="uNice" data-options="required:true"></input></td>
            </tr>
            <tr>
                <td>Phone:</td>
                <td>
                    <input class="easyui-textbox" id="uPhone" type="text" name="uPhone" data-options="required:true" validType='mobile'></input>
                </td>
            </tr>
            <tr>
                <td>Email:</td>
                <td><input class="easyui-textbox" id="uEmail" type="text" name="uEmail" data-options="required:true" validType='email'></input></td>
            </tr>
            <tr>
                <td>Img:</td>
                <td><input class="easyui-filebox" id="file"  name="file" data-options="buttonText:'选择图片....',prompt:'图片....'" style="height:40px;width:200px"></input></td>
            </tr>
            <tr>
                <td>Sex:</td>
                <td> <select class="easyui-combobox" name="uSex"  id="uSex" data-options="panelHeight:'auto'" style="width: 140px; height: 40px;">
                    <option value="F">男</option>
                    <option value="M">女</option>
                </select></td>
            </tr>
            <tr>
                <td>Integral:</td>
                <td><input class="easyui-textbox" id="uJifen" name="uJifen"  data-options="required:true" validType='number'></input></td>
            </tr>

            </tr>
        </table>
        <div id="userInfo-buttons" style="display: block">
            <a id="userInfo_sub" href="javascript:void(0)" class="easyui-linkbutton c6" iconcls="icon-ok" onclick="submitFormUserInfo()" style="width: 90px">提交</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#userInfo').dialog('close')" style="width: 90px">取消</a>
        </div>
    </form>
</div>

<script type="text/javascript">
    var userLevelId;
    var temp=true;
    var text="";
    $(function(){
        AjaxUserTree();
    });

    $.extend($.fn.validatebox.defaults.rules, {
        CHS: {
            validator: function (value, param) {
                return /^[\u0391-\uFFE5]+$/.test(value);
            },
            message: '请输入汉字'
        },
        english : {// 验证英语
            validator : function(value) {
                return /^[A-Za-z]+$/i.test(value);
            },
            message : '请输入英文'
        },
        ip : {// 验证IP地址
            validator : function(value) {
                return /\d+\.\d+\.\d+\.\d+/.test(value);
            },
            message : 'IP地址格式不正确'
        },
        ZIP: {
            validator: function (value, param) {
                return /^[0-9]\d{5}$/.test(value);
            },
            message: '邮政编码不存在'
        },
        QQ: {
            validator: function (value, param) {
                return /^[1-9]\d{4,10}$/.test(value);
            },
            message: 'QQ号码不正确'
        },
        mobile: {
            validator: function (value, param) {
                return /^(?:13\d|15\d|18\d)-?\d{5}(\d{3}|\*{3})$/.test(value);
            },
            message: '手机号码不正确'
        },
        tel:{
            validator:function(value,param){
                return /^(\d{3}-|\d{4}-)?(\d{8}|\d{7})?(-\d{1,6})?$/.test(value);
            },
            message:'电话号码不正确'
        },
        mobileAndTel: {
            validator: function (value, param) {
                return /(^([0\+]\d{2,3})\d{3,4}\-\d{3,8}$)|(^([0\+]\d{2,3})\d{3,4}\d{3,8}$)|(^([0\+]\d{2,3}){0,1}13\d{9}$)|(^\d{3,4}\d{3,8}$)|(^\d{3,4}\-\d{3,8}$)/.test(value);
            },
            message: '请正确输入电话号码'
        },
        number: {
            validator: function (value, param) {
                return /^[0-9]+.?[0-9]*$/.test(value);
            },
            message: '请输入数字'
        },
        money:{
            validator: function (value, param) {
                return (/^(([1-9]\d*)|\d)(\.\d{1,2})?$/).test(value);
            },
            message:'请输入正确的金额'

        },
        mone:{
            validator: function (value, param) {
                return (/^(([1-9]\d*)|\d)(\.\d{1,2})?$/).test(value);
            },
            message:'请输入整数或小数'

        },
        integer:{
            validator:function(value,param){
                return /^[+]?[1-9]\d*$/.test(value);
            },
            message: '请输入最小为1的整数'
        },
        integ:{
            validator:function(value,param){
                return /^[+]?[0-9]\d*$/.test(value);
            },
            message: '请输入整数'
        },
        range:{
            validator:function(value,param){
                if(/^[1-9]\d*$/.test(value)){
                    return value >= param[0] && value <= param[1]
                }else{
                    return false;
                }
            },
            message:'输入的数字在{0}到{1}之间'
        },
        minLength:{
            validator:function(value,param){
                return value.length >=param[0]
            },
            message:'至少输入{0}个字'
        },
        maxLength:{
            validator:function(value,param){
                return value.length<=param[0]
            },
            message:'最多{0}个字'
        },
        //select即选择框的验证
        selectValid:{
            validator:function(value,param){
                if(value == param[0]){
                    return false;
                }else{
                    return true ;
                }
            },
            message:'请选择'
        },
        idCode:{
            validator:function(value,param){
                return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value);
            },
            message: '请输入正确的身份证号'
        },
        loginName: {
            validator: function (value, param) {
                return /^[\u0391-\uFFE5\w]+$/.test(value);
            },
            message: '登录名称只允许汉字、英文字母、数字及下划线。'
        },
        equalTo: {
            validator: function (value, param) {
                return value == $(param[0]).val();
            },
            message: '两次输入的字符不一至'
        },
        englishOrNum : {// 只能输入英文和数字
            validator : function(value) {
                return /^[a-zA-Z0-9_ ]{1,}$/.test(value);
            },
            message : '请输入英文、数字、下划线或者空格'
        },
        xiaoshu:{
            validator : function(value){
                return /^(([1-9]+)|([0-9]+\.[0-9]{1,2}))$/.test(value);
            },
            message : '最多保留两位小数！'
        },
        ddPrice:{
            validator:function(value,param){
                if(/^[1-9]\d*$/.test(value)){
                    return value >= param[0] && value <= param[1];
                }else{
                    return false;
                }
            },
            message:'请输入1到100之间正整数'
        },
        jretailUpperLimit:{
            validator:function(value,param){
                if(/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)){
                    return parseFloat(value) > parseFloat(param[0]) && parseFloat(value) <= parseFloat(param[1]);
                }else{
                    return false;
                }
            },
            message:'请输入0到100之间的最多俩位小数的数字'
        },
        rateCheck:{
            validator:function(value,param){
                if(/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)){
                    return parseFloat(value) > parseFloat(param[0]) && parseFloat(value) <= parseFloat(param[1]);
                }else{
                    return false;
                }
            },
            message:'请输入0到1000之间的最多俩位小数的数字'
        }
    });

    function AjaxUserTree() {
        $('#user_url').tree({
            url:'menuTree/selectUserTree',
            onDblClick: function(node){/*
                alert(node.id);*/
                //bookId=node.id;
                userLevelId=node.id;
                $('#userLevelTg').datagrid('options').url='/menuTree/userInfo/'+node.id;
                DataGrid(node.id);
            },
            onContextMenu:function (e,node) {
                userLevelId=node.id;
                text=node.text;
                e.preventDefault();
                $('#mm').menu('show', {
                    left: 200,
                    top: 100
                });
            }
        });
    }

    function DataGrid(id) {
        $('#userLevelTg').datagrid({
            url:'menuTree/userInfo/'+id,
            columns:[[
                {title: '全选', field: 'ck',checkbox : true, sortable: false},
                {field:'uId',align:'center',title:'用户ID',width:100},
                {field:'uName',align:'center',title:'用户名称',width:100},
                {field:'uPassword',align:'center',title:'用户密码',width:100},
                {field:'uNice',align:'center',title:'用户昵称',width:100},
                {field:'uPhone',align:'center',title:'用户电话',width:100},
                {field:'uEmail',align:'center',title:'用户邮箱',width:100},
                {field:'uImage',align:'center',title:'用户图像',formatter:imgUserInfoFormatter,width:100},
                {field:'uSex',align:'center',title:'用户性别',formatter:meupdate,width:100},
                {field:'uJifen',align:'center',title:'用户积分',width:100},
                {field:'uCreatime',align:'center',title:'创建时间',formatter:formatDatebox,width:200},

            ]],
            fitColumns:true,
            pagination:true,
            rowNumbers:true,
            singleSelect: false,
        });
        var p = $('#userLevelTg').datagrid('getPager');
        $(p).pagination({
            pageSize: 10,//每页显示的记录条数，默认为10
            pageList: [5, 10, 15],//可以设置每页记录条数的列表
            beforePageText: '第',//页数文本框前显示的汉字
            afterPageText: '页    共 {pages} 页',
            displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录',
        });
    }

    function imgUserInfoFormatter(value,row,index) {
        if(value == ''){
            return '';
        }else{
            return '<img  style="display:block;margin:0 auto" src="/upload/'+value+'" height="50" width="50" />';
        }
    }

    function formatDatebox(milliseconds) {
        if (milliseconds != "" && milliseconds != null
            && milliseconds != "null") {
            var datetime = new Date();
            datetime.setTime(milliseconds);
            var year = datetime.getFullYear();
            var month = datetime.getMonth() + 1 < 10 ? "0"
                + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
            var date = datetime.getDate() < 10 ? "0" + datetime.getDate()
                : datetime.getDate();
            var hour = datetime.getHours() < 10 ? "0" + datetime.getHours()
                : datetime.getHours();
            var minute = datetime.getMinutes() < 10 ? "0"
                + datetime.getMinutes() : datetime.getMinutes();
            var second = datetime.getSeconds() < 10 ? "0"
                + datetime.getSeconds() : datetime.getSeconds();
            return year + "-" + month + "-" + date + " " + hour + ":" + minute
                + ":" + second;
        } else {
            return "";
        }
    }

    function meupdate(text) {
        if (text=='F'){
            return "男";
        }else{
            return "女";
        }
    }

    function deleteUserLevel() {
        /*
        alert(userLevelId);*/
        if (userLevelId==0){
            $.messager.alert("提示","请在子目录上选择删除!","info");
        }else{
            ajaxDeleteUserLevel();
        }

    }

    function ajaxDeleteUserLevel() {
        $.messager.confirm('提示','确定要删除:'+text+'吗?以及'+text+'下的所有用户?',function (flag) {
            if (flag){
                $.ajax({
                    url:'userLevel/delete',
                    type:'POST',
                    data:{id:userLevelId},
                    success:function (result) {
                        $.messager.alert("提示","删除成功","info");
                        AjaxUserTree();
                    },
                    error:function (result) {
                        $.messager.alert("提示","删除失败","info");
                    }
                });
            }else{
                return ;
            }
        });
    }

    function addUserLevel() {
        if (userLevelId==0){
            $('#userLevel').form('clear');
            $('#userLevel').dialog({
                closed:false,
                cache:false,
                modal:true,
                title:"用户等级添加",
            });
        }else{
            $.messager.alert("提示","请在父目录上右击!","info");
        }
        $('#lId').textbox({
            editable:true,
        });
    }

    function submitUserLevelForm() {
        if (temp ==true){
            var v=$('#userLevel').form('validate');
            if (v){
                $.ajax({
                    url:'userLevelAdd',
                    type:'POST',
                    data:$('#userLevelForm').serialize(),
                    success:function (result) {
                        $.messager.alert("提示","添加成功","info");
                        $('#userLevel').dialog('close',true);
                        AjaxUserTree();
                    },
                    error:function (result) {
                        $.messager.alert("提示","添加失败","info");
                    }
                });
            }else{
                $.messager.alert("提示","请填写相关数据!","info");
            }

        }else{
            $.ajax({
                type:"POST",
                url:'userLevel/update',
                data:$('#userLevelForm').serialize(),
                success:function (result) {
                    $.messager.alert("提示信息","操作成功!","info");
                    $('#userLevel').dialog('close',true);
                    AjaxUserTree();
                },
                error:function (result) {
                    $.messager.alert("提示信息","操作失败!","info");
                    $('#userLevel').dialog('close',true);
                }
            });
        }
    }

    function updateUserLevel() {
        if (userLevelId==0){
            $.messager.alert("提示","请在子目录上右击!","info");
        }else{
            temp=false;
            AjaxUpdateUserLevel();
        }
    }
    function AjaxUpdateUserLevel() {
        $.ajax({
            url:'findUserLevelById' ,
            data:{"id":userLevelId},
            type:'POST',
            success:function (result) {
                $('#userLevel').dialog({
                    closed:false,
                    cache:false,
                    modal:true,
                    title:"用户等级修改",
                });
                $('#userLevelForm').form('load',{
                    lId:result.data.lId,
                    lName:result.data.lName,
                    lCzzhi:result.data.lCzzhi,
                    lDiscount:result.data.lDiscount,
                    lMeber:result.data.lMeber,
                });

                $('#lId').textbox({
                    editable:false,
                });
            }
        });
    }

    $('#userInfoAdd').linkbutton({
        onClick:function () {
            temp = true;
            $('#userInfo_form').form('clear');
            selectUserlevel();
            $('#uJifen').textbox('setValue',0);
            $('#uPassword').textbox('setValue','00000000');
            $('#userInfo').dialog({
                closed:false,
                cache:false,
                modal:true,
                title:"用户添加",
            });
            $('#uId').textbox({
                editable:true,
            });

        }
    });

    function selectUserlevel() {
        $.ajax({
            url: 'userLevel/selectAll',
            type:'POST',
            success:function (result) {
                $('#userLevel_id').combobox('loadData',result.data);
            },
            error:function (result) {
                alert(result);
            }
        });
    }

    function submitFormUserInfo() {
        var userForm=new FormData($('#userInfo_form')[0]);
        //alert(userForm);
        if (temp==true){
            var v=$('#userInfo').form('validate');
            if (v){
                $.ajax({
                    url:'userInfoAdd',
                    type:'post',
                    data:userForm,
                    processData : false,
                    contentType : false,
                    success:function (result) {
                        $.messager.alert("提示信息","操作成功!","info");
                        $('#userInfo').dialog('close',true);
                        $('#userInfo_form').form('clear');
                        var node=$('#user_url').tree('find',userForm.get("lId"));
                        $('#user_url').tree('select',node.target);
                        DataGrid(userForm.get("lId"));
                    },
                    error:function (result) {
                        $.messager.alert("提示信息","操作失败!","info");
                    }
                });
            }else{
                $.messager.alert("提示信息","请输入相关数据!","info");
            }

        }else{
            //alert(fd.get("bId"));
            $.ajax({
                url:'userInfoUpdate',
                type:'POST',
                data:userForm,
                processData : false,
                contentType : false,
                success:function (result) {
                    $.messager.alert("提示信息","操作成功!","info");
                    $('#userInfo').dialog('close',true);
                    $('#userInfo_form').form('clear');
                    DataGrid(userForm.get("lId"));

                },
                error:function (result) {
                    $.messager.alert("提示信息","操作失败!","info");
                }
            });
        }
    }

    $('#userInfoUpate').linkbutton({
       onClick:function () {
           temp=false;
           var len=$('#userLevelTg').datagrid('getSelections').length;
           if (len ==1){
               var rows=$('#userLevelTg').datagrid('getSelected').uId;
               userInfoUpate(rows);
           }else{
               $.messager.alert("提示","请选择一行需要修改的数据!","info");
           }
       }
    });

    function userInfoUpate(id) {
        $.ajax({
            url: 'findUserInfoById',
            data: {"id": id},
            type: 'POST',
            success: function (result) {
                $('#userInfo').dialog({
                    closed: false,
                    cache: false,
                    modal: true,
                    title: "用户修改",
                });
                $('#userInfo_form').form('clear');
                $('#userInfo_form').form('load', {
                    uId: result.data.uId,
                    lId: result.data.lId,
                    uName:result.data.uName,
                    uPassword: result.data.uPassword,
                    uNice: result.data.uNice,
                    uPhone: result.data.uPhone,
                    uEmail: result.data.uEmail,
                    //uImage:result.data.bookMsg,
                    uSex:result.data.uSex=='F'?'男':'女',
                    uJifen:result.data.uJifen,
                    //file:result.data.bookImg,
                });
                $('#uId').textbox({
                    editable:false,
                });
               /* $('#bookKind_id').textbox({
                    editable:false,
                })*/
            }
        });
    }
    
    $('#multUserInfoDelete').linkbutton({
        onClick:function () {
            var arry=[];
            var len=$('#userLevelTg').datagrid('getSelections');
            if (len ==0){
                $.messager.alert("提示","请选择一行或者多行删除","info");
            }else{

                for (var i=0;i<len.length;i++){
                    arry.push(len[i].uId);
                }
                $.messager.confirm("提示","确定要删除吗?",function (flag) {
                    if (flag){
                        $.ajax({
                            url:'multDeleteUserInfo' ,
                            type:'POST',
                            data:{multId:arry},
                            traditional:true,
                            success:function (result) {
                                $.messager.alert("提示","删除成功","info");
                                DataGrid(userLevelId);
                            }
                            ,
                            error:function (result) {
                                $.messager.alert("提示","删除失败","info");
                            }
                        });
                    }else {
                        return ;
                    }
                });
            }
        }
    });

    $('#searchUserInfo').linkbutton({
        onClick:function () {
            var arry=[];
            var userInfoId=$('#userInfoId').textbox('getValue');
            var userInfoName=$('#userInfoName').textbox('getValue');
            if (userLevelId==null||userLevelId==""||userLevelId==undefined){
                $.messager.alert("提示","请选择查询用户等级下的用户!","info");
            }else{
                if ((userInfoId==null||userInfoId=="") && (userInfoName==null||userInfoName=="")){
                    //$.messager.alert("提示","请输入查询图书条件!","info");
                    DataGrid(userLevelId);
                }else{
                    // arry.push(bookInfoId);
                    // arry.push(bookInfoName);
                    $.ajax({
                        url:'expFindUserInfo' ,
                        type:'POST',
                        data:{"userInfoId":userInfoId,"userInfoName":userInfoName},
                        //traditional:true,
                        success:function (result) {
                            $.messager.alert("提示","查询成功","info");
                            $('#userLevelTg').datagrid('loadData',result.data);
                        }
                        ,
                        error:function (result) {
                            $.messager.alert("提示","查询失败","info");
                        }
                    });
                }
            }
        }
    })

</script>
</body>
</html>